﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using LinqToDB.Provider;

namespace LinqToDB
{
    public class Class1
    {
        static int intBBB = 999;
        static int[] intArr = { 123, 4523, 434 };
        static void Main()
        {
            Table<AAA> tableA = new Table<AAA>();
            Table<AAA> tableB = new Table<AAA>();

            int abc = 53421;
            var query = tableA.Select(t => new { t.ID,t.Name,t.Value});
            query = query.Where(t => t.ID > 100);
            var query1 = query.Where(t => intArr[2] >= t.ID).Select(t => new { t.ID, t.Name });
            var query2 = query1.Select(t => t.ID + abc);
            foreach (var item in query2)
            {
                Console.WriteLine(item);
            }

            Console.ReadLine();
        }

        static int GetID()
        {
            return 123;
        }
    }
    class BBB
    {
        public int ID { get; set; }
        public string Name { get; set; }
        public DateTime Value { get; set; }
    }

    class AAA
    {
        public int ID { get; set; }
        public string Name { get; set; }
        public DateTime Value { get; set; }
    }
}
